package com.shop.cereshop.app.service.report;

import com.shop.cereshop.app.param.report.ReportPageDTO;
import com.shop.cereshop.app.param.report.MyReportPageDTO;
import com.shop.cereshop.app.page.report.ReportRecordVO;
import com.shop.cereshop.commons.domain.buyer.CereBuyerUser;
import com.shop.cereshop.commons.domain.common.Page;
import com.shop.cereshop.commons.domain.report.CereReportRecord;
import com.shop.cereshop.commons.domain.report.dto.ReportSubmitDTO;
import com.shop.cereshop.commons.exception.CoBusinessException;

import java.util.List;

/**
 * 举报记录服务接口
 *
 * @author
 */
public interface CereReportRecordService {

    /**
     * 提交举报
     *
     * @param param 举报参数
     * @param user  当前用户
     * @return 举报ID
     * @throws CoBusinessException 业务异常
     */
    Long submitReport(ReportSubmitDTO param, CereBuyerUser user) throws CoBusinessException;

    /**
     * 分页查询举报记录
     *
     * @param param 查询参数
     * @param user  当前用户
     * @return 举报记录分页数据
     * @throws CoBusinessException 业务异常
     */
    Page<ReportRecordVO> getReportPage(ReportPageDTO param, CereBuyerUser user) throws CoBusinessException;

    /**
     * 获取举报详情
     *
     * @param reportId 举报ID
     * @param user     当前用户
     * @return 举报详情
     * @throws CoBusinessException 业务异常
     */
    ReportRecordVO getReportDetail(Long reportId, CereBuyerUser user) throws CoBusinessException;

    /**
     * 撤销举报
     *
     * @param reportId 举报ID
     * @param user     当前用户
     * @return 是否成功
     * @throws CoBusinessException 业务异常
     */
    Boolean cancelReport(Long reportId, CereBuyerUser user) throws CoBusinessException;

    /**
     * 检查用户是否已举报
     *
     * @param targetType 目标类型
     * @param targetId   目标ID
     * @param user       当前用户
     * @return 是否已举报
     */
    Boolean hasReported(Integer targetType, Long targetId, CereBuyerUser user);

    /**
     * 获取我的举报列表
     *
     * @param param 查询参数
     * @param user  当前用户
     * @return 我的举报列表
     * @throws CoBusinessException 业务异常
     */
    Page<ReportRecordVO> getMyReports(MyReportPageDTO param, CereBuyerUser user) throws CoBusinessException;

    /**
     * 统计举报数量
     *
     * @param user 当前用户
     * @return 举报统计信息
     */
    Object getReportStats(CereBuyerUser user);
}
